package cn.tips.dmp.common.upload.po;

import lombok.Data;
import lombok.EqualsAndHashCode;
import cn.tips.dmp.supports.jpa.BaseJpaSnowflakeIdEntity;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tips_attach_file")
@Where(clause="is_del = 0")
public class AttachFile extends BaseJpaSnowflakeIdEntity {


    /**
     * 关联id
     */
    @Column
    private Long relationId;

    /**
     * 文件名称
     */
    @Column
    private String name;

    /**
     * 文件全路径
     */
    @Column
    private String path;

    /**
     * 附件类型  对应 成果类型
     */
    @Column
    private String type;


    /**
     * 业务类型
     */
    @Column
    private Integer businessType;

    /**
     * 创建时间
     */
    @Column
    private Date createTime = new Date();

    /**
     * 更新时间
     */
    @Column
    private Date updateTime = new Date();

    /**
     * 智库id
     */
    @Column
    private Long orgId;

    /**
     * 是否删除
     */
    @Column(nullable = false)
    private Boolean  isDel= false;

}
